package com.example.jajt;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    public static String convert(long timestamp) {
        String result = null;
        if (timestamp == 0L)
            return result;
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd HHmmss");
            result = sdf.format(new Date(timestamp));

        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
}
